<template>
	<scroll-view class="content-style" scroll-y>
		<block v-for="(item, index) in list" :key="index">
			<view class="item-box">
				<image :src="item.logo" mode="aspectFill"></image>
				<view class="right-box">
					<text class="name">{{item.name}}</text>
					<text class="mobile">机构电话: {{item.phone}}</text>
				</view>
			</view>
		</block>
	</scroll-view>
</template>

<script>
	import { institution } from '@/api/index/index'
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			this.loadData();
		},
		methods: {
			loadData() {
				institution(response => {
					this.list = response;
				}) 
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item-box {
		display: flex;
		align-items: center;
		margin: 35rpx 30rpx 0;
		border-radius: 16rpx;
		box-shadow: 0 0 16rpx rgba(0,0,0,0.1);
		padding: 40rpx 30rpx;
		background-color: #fff;
		image {
			width: 120rpx;
			height: 120rpx;
		}
		.right-box {
			display: flex;
			flex-direction: column;
			margin-left: 20rpx;
			.name {
				font-size: 36rpx;
				font-weight: bold;
				color: #333333;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
			.mobile {
				margin-top: 20rpx;
				font-size: 26rpx;
				color: #999999;
			}
		}
	}
</style>